﻿#ifndef ZMQREQUESTER_H
#define ZMQREQUESTER_H

#include <QObject>
#include "baserequester.h"

class ZmqRequester:public BaseRequester
{
    Q_OBJECT
public:
    Q_INVOKABLE explicit ZmqRequester(QObject *parent = nullptr);
    virtual ~ZmqRequester();

public:
    virtual bool connectToHost() override;
    virtual bool isConnected() override;
    virtual bool disConnect() override;

    virtual QByteArray request(QByteArray data) override;

    virtual bool requestNoReply(QByteArray data) override;

private:
    //  Socket to talk to clients
    void *_context;
    void *_socket;

public:
    virtual QWidget *getConfigWidget() override;
};

#endif // ZMQREQUESTER_H
